<template>
  <div class="income-expense">
    <h2>收益管理</h2>
    <!-- <p>这里是收益管理页面，用于管理收入和支出。</p> -->
    
    <!-- <el-row :gutter="20" style="margin-bottom: 20px;">
      <el-col :span="8">
        <el-card>
          <div slot="header">本月收入</div>
          <div style="font-size: 24px; color: #67C23A;">¥234,580</div>
        </el-card>
      </el-col>
      <el-col :span="8">
        <el-card>
          <div slot="header">本月支出</div>
          <div style="font-size: 24px; color: #F56C6C;">¥89,650</div>
        </el-card>
      </el-col>
      <el-col :span="8">
        <el-card>
          <div slot="header">净利润</div>
          <div style="font-size: 24px; color: #409EFF;">¥144,930</div>
        </el-card>
      </el-col>
    </el-row>
    
    <el-table :data="incomeExpenseData" style="width: 100%" border>
      <el-table-column prop="date" label="日期" width="120"></el-table-column>
      <el-table-column prop="type" label="类型" width="100">
        <template slot-scope="scope">
          <el-tag :type="scope.row.type === '收入' ? 'success' : 'warning'">
            {{ scope.row.type }}
          </el-tag>
        </template>
      </el-table-column>
      <el-table-column prop="category" label="分类" width="150"></el-table-column>
      <el-table-column prop="amount" label="金额" width="120"></el-table-column>
      <el-table-column prop="description" label="描述"></el-table-column>
      <el-table-column prop="operator" label="操作人" width="100"></el-table-column>
    </el-table> -->
  </div>
</template>

<script>
export default {
  name: 'IncomeExpense',
  data() {
    return {
      incomeExpenseData: [
        { date: '2024-01-15', type: '收入', category: '物业费', amount: '¥50,000', description: '1月物业费收入', operator: 'admin' },
        { date: '2024-01-14', type: '收入', category: '车位费', amount: '¥15,000', description: '车位租赁费', operator: 'admin' },
        { date: '2024-01-13', type: '支出', category: '维修费', amount: '¥5,000', description: '电梯维修费用', operator: 'admin' },
        { date: '2024-01-12', type: '支出', category: '清洁费', amount: '¥3,000', description: '清洁人员工资', operator: 'admin' }
      ]
    }
  }
}
</script>